import { defineConfig } from 'vitepress'
import {nav} from "./config/nav.config"
import {sidebar} from "./config/slide.config"
import { resolve,join } from 'path'
// https://vitepress.dev/reference/site-config
export default defineConfig({
  title: "UI 组件库",
  description: "一个 UI 组件的说明文档和 demo 演示",
  head: [['link', { rel: 'icon', href: '/logo.png' }]],
  lastUpdated: true,
  ignoreDeadLinks: true,
  themeConfig: {
    logo: "/logo.png",
    // 本地文档搜索
    search: {
      provider: 'local'
    },
    // https://vitepress.dev/reference/default-theme-config
    // 导航栏
    nav,
    // 侧边栏
    sidebar,

    socialLinks: [
      { icon: 'github', link: 'https://github.com/vuejs/vitepress' }
    ]
  },
  vite:{
    resolve:{
      alias:{
        "@/":join(__dirname,'../'),
        "@view/":join(__dirname,'../view/'),
        "@doc/":join(__dirname,'../doc/'),
        "@ui/":join(__dirname,"../../ui/")
      }
    }
  }
})
